/*
 * Copyright (c) 2025 EasyAdmin
 * All rights reserved.
 *
 * This file is part of the [EasAdmin] project.
 * Unauthorized copying of this file, via any medium, is strictly prohibited.
 * Proprietary and confidential.
 *
 * Author: EasyAdmin ( 1073602@qq.com )
 * Website: https://www.xhxiao.com
 */
package com.easy.module.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.easy.framework.common.validate.Add;
import com.easy.framework.common.validate.Update;
import com.easy.framework.database.entity.LogicDeleteEntity;
import com.easy.framework.poi.annotation.Excel;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

/**
 * 岗位信息表 实体
 *
 * @author EasyAdmin ( 1073602@qq.com )
 * @date 2025-08-19
 */
@Getter
@Setter
@TableName("sys_post")
public class SysPost extends LogicDeleteEntity
{
    private static final long serialVersionUID = 1L;

    /**
     * 岗位编号
     */
    @NotNull(message="岗位编号不能为空", groups = {Update.class})
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 岗位标识
     */
    @NotBlank(message="岗位标识不能为空", groups = {Add.class , Update.class})
    @Size(message = "岗位标识长度必须小于32个字符",max = 32,groups = {Add.class,Update.class})
    private String postKey;

    /**
     * 岗位名称
     */
    @NotBlank(message="岗位名称不能为空", groups = {Add.class , Update.class})
    @Size(message = "岗位名称长度必须小于50个字符",max = 50,groups = {Add.class,Update.class})
    private String postName;

    /**
     * 顺序
     */
    @NotNull(message="顺序不能为空", groups = {Add.class , Update.class})
    private Integer sort;

    /**
     * 归属部门
     */
    private Long deptId;

    /**
     * 状态（0正常 1停用）
     */
    @NotNull(message="状态（0正常 1停用）不能为空", groups = {Add.class , Update.class})
    private Integer status;

    /**
     * 备注
     */
    @Size(message = "备注长度必须小于500个字符",max = 500,groups = {Add.class,Update.class})
    private String remark;

    @TableField(exist = false)
    private String deptName;
}
